Skip to content

Conversation

@RonnyPfannschmidt
Copy link
Contributor

setuptools_scm automatically set the version attribute - manually setting it wrong

Description

Motivation and Context

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

RonnyPfannschmidt and others added 2 commits October 13, 2025 12:21
setuptools_scm automatically set the version attribute - manually setting it wrong
@SunsetWolf SunsetWolf changed the title dont manually call setuptools_scm - its integrated chore(build): rely on integrated setuptools_scm instead of manual call Nov 10, 2025
@SunsetWolf
Copy link
Collaborator

Hi, @RonnyPfannschmidt

First of all, thank you for your contribution to qlib.

However, there are some problems with the code you contributed:

  • If you directly remove the version information in setup.py, it will cause some hidden problems, such as running qlib.__version__ error after installing whl file with pip, so I push a commit to fix this problem.

  • Also please agree to (C)ontributor (L)icense (A)greement.

Finally, thanks for your contribution.

@SunsetWolf SunsetWolf merged commit ac3fe94 into microsoft:main Nov 10, 2025
123 of 128 checks passed
try:
from ._version import version as __version__
except ImportError:
__version__ = get_version(root="..", relative_to=__file__)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_version shouldn’t be used at runtime - editable install should be used for doc building/testing

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the coments, Can you fix this with a new pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants